<?php
	require_once 'AdminService.class.php';
	//接收用户的数据
	$id = $_POST['id'];
	$password = $_POST['password'];
	
	$adminService = new AdminService();
	if($name=$adminService->checkAdmin($id, $password)){
		header("location:main.php?name=$name");
		exit();
	}else{
		header("location:login.php?errorNo=1");
		exit();
	}
?>
	
	